<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="root">
			<h2 :style="{opacity: opacity}">欢迎学习Vue</h2>
		</div>
		<script type="text/javascript">
			const vm = new Vue({
				el: '#root',
				data: {
					opacity: 1
				},
				methods: {

				},
				mounted() {
					setInterval(() => {
						this.opacity -= 0.01
						if (this.opacity <= 0) {
							this.opacity = 1
						}
					}, 16)
				}
			})
		</script>
	</body>
</html>
